#ifndef PLAYER_H
#define PLAYER_H

#include <sys/types.h>
#include <unistd.h>

//#define MUSIC_PATH "/home/lkw/music_list/"
#define MUSIC_PATH "/home/root/music_list/"

#define SHMSIZE 4096

#define SEQUENCEMODE    1
#define RANDOM          2
#define CIRCLE          3

//共享内存数据
struct shm{
        int play_mode;
        char cur_name[64];
        pid_t ppid;
        pid_t child_pid;
        pid_t grand_pid;
};
typedef struct shm shm;

int InitShm();

void getMusic();
int m_mp3_end(const char* name);
void play_music(const char* name);


void start_play();
void stop_play();
void suspend_play();
void continue_play();
void prior_play();
void next_play();
void voice_up();
void voice_down();
void set_mode(int mode);

#endif